import { createRouter, createWebHistory } from 'vue-router'

import Login from '../views/Login.vue'
import Home from '../views/Home.vue'




const router = createRouter({
    history: createWebHistory(),
    routes:[
      {
        path:'/',
        component:Login
        
      },{
        path:'/home',
        component:Home,
        // redirect:'/home',
        children:[
           
        ]
      },{
        path: '/:catchAll(.*)',
        name: 'NotFound',
        component:() => import('../views/notFound.vue')
      }
    
    ],
    // scrollBehavior(to, from, savedPosition) {
    //   // 始终滚动到顶部
    //   return { top: 0 }
    // }
    
  })
  
  export default router
  